package cn.xyhelp.shop.mall.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * <p>
 * 商品评论
 * </p>
 *
 * @author violetfreesia
 * @since 2022-02-15
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("comment")
public class Comment extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 评论内容
     */
    @TableField("description")
    private String description;

    /**
     * 星级，最大5星
     */
    @TableField("star")
    private Integer star;

    /**
     * 评论图像，用分号隔开
     */
    @TableField("img_urls")
    private String imgUrls;

    @TableField("user_id")
    private Integer userId;

    /**
     * 订单编号，可以是商品订单，服务订单
     */
    @TableField("order_id")
    private Integer orderId;

    /**
     * 商品订单才有销售单元id
     */
    @TableField("sale_unit_id")
    private Integer saleUnitId;

    /**
     * 服务员id, 纯商品订单没有服务员
     */
    @TableField("staff_id")
    private Integer staffId;

    /**
     * 商品id或服务id
     */
    @TableField("product_id")
    private Integer productId;


}
